<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title></title>
  <link rel="stylesheet" href="newyear.css" />
    <script type="text/javascript">size = window.screen.width / 30;
document.getElementsByTagName("html")[0].style.fontSize = size + "px";
//	音乐托盘		

window.onload = function() {

	var player = document.getElementById("player");
	var c = document.getElementById("cipan");
	c.addEventListener("touchstart", function() {
			if(player.paused) {
				player.play();
				this.setAttribute("class", "play");

			} else {
				player.pause();
				this.setAttribute("class", "stop");

			}
		}

		, false);

	//换页			

	var next = document.getElementById("jiantou");
	var p1 = document.getElementById("page1");
	var p2 = document.getElementById("page2");
	next.addEventListener("touchstart", function() {
			p1.setAttribute("class", "page1-1");
			p2.setAttribute("class", "page2-2");
		}

		, false);
	////飘落
	//var canvas = document.getElementById("canvas");
	//			canvas.width = document.body.clientWidth;
	//			canvas.height = document.body.clientHeight;
	//			
	//			var snow_x = new Array();
	//			var snow_y = new Array();
	//			var fontSizes = new Array();
	//			for(var i = 0 ; i < 100 ; i++){
	//				snow_x[i] = Math.random()*canvas.width;
	//				snow_y[i] = -1*Math.random()*canvas.height;
	//				fontSizes[i] = Math.random()*30+20;
	//			}
	//			
	//			//获取context2d
	//			var context = canvas.getContext("2d");
	//			context.fillStyle = "red";
	//			//setInterval可以定时执行操作
	//			var speedy = 10;
	//			var speedx = 5;
	//			setInterval(function(){
	//				context.clearRect(0,0,canvas.width,canvas.height);
	//				for(var i = 0 ; i < 100 ; i++){
	//					snow_y[i] = snow_y[i] + speedy ;
	//					if(snow_y[i]>canvas.height){
	//						snow_y[i] = -1*Math.random()*canvas.height;
	//					} 
	//					context.font = fontSizes[i]+"px arial";
	//					context.fillText("*",snow_x[i],snow_y[i]);
	//				}
	//			},50);		

	//////////////////////////////////////////////////////////////////////////////

	var bt = document.getElementById("bt");
	var wx = document.getElementById("wx");
	bt.addEventListener("touchstart", function() {
			wx.style.display = "block";
			bt.style.animationPlayState = "paused";
		}

		, false);
	wx.addEventListener("touchstart", function() {
			if(wx.style.display == "block") {
				wx.style.display = "none";
			}

		}

		, false);
};</script>
</head>
<body>
<div id="mainbody" >
 <audio id="player" src="chunwan.mp3" autoplay="autoplay" loop="loop"></audio>						
  <div class="music"><img  id="cipan" class="play" src="music1.png" />	<img src="music2.png" /></div>        
  		     
		<div id="page1" class="page1" >
	  <!--<canvas id="canvas" style="z-index: 10;position: absolute;top: 0;left: 0%;"></canvas>
	-->
					    <div class="p_moon"><img src="moon.png" / > </div> 
		                    <div class="moonlight"> </div>
		                       <div class="happy"><img src="happy.png"></div>	
						        	<div class="yanhua"><img src="yanhua.png" /></div>
									  <div class="city"><img src="city.png" /></div>
                                        <div class="shizi"><img src="shizi.png"></div>
											<div  class="lantern"><img src="latern.png"></div>
									           <div  id="jiantou" class="jt"><img src="jiantou.png"></div>  
	                    
	                   
				    	    
		  </div>
		
		
<div id="page2" class="page2">
	 <div class="p2-back"> <img src="5848fad86b07f.jpg"/></div>
	        <div class="p2_chicken"> <img src="denglong2.png"/></div>
				   <div class="write">
						<h3>我怕三十晚上的祝福太多 ，您会不在意我的问候;<br/></h3>
						<h3>我怕初二中午的菜肴太香， 您会看不见我的短信;<br/></h3>
						<h3>我怕初一早上的鞭炮太吵， 您会听不到我的祝福 ;<br/></h3>
						<h3>所以选择现在这个时候给您送来祝福，祝您及你家人新春愉快，身体健康,鸡年大吉！我在这里给您拜个早年啦!</h3>
					</div>
							<div class="button1">
								<h4>看完好感动啊，我忍不住要发红包了<br/>
									
								</h4>
									<a href="#" class="button yellow" id="bt">我要发红包！</a>
							</div>
												<div  id="wx" class="weixin">
													<img src="weixin.jpg">
													
												</div>
 
</div>			
</div>
</body>
</html>